home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
-
- #ifndef _GENERIC_APP
- #define _GENERIC_APP
-
- /* currentfilename is the name of the currently-open file. If there
- * is none, currentfilename[0] == 0.
- */
-
- extern char currentfilename[];
-
- /* flags: */
-
- extern long VIEW_ONLY, view_only;
- extern long MAKE_BACKUPS;
- extern long MAKE_CHECKPOINTS;
- extern long foreground_flag, dirtyfile_flag;
- extern long xorg, yorg, xsize, ysize;
-
- #define PROG_NAME "geom"
- #define PROG_VERSION "0.1"
-
- #define PULLDOWNHEIGHT 26
-
- void handlenewcmd();
- void handleopencmd();
- void handlesavecmd();
- void handlesaveascmd();
- void handleinsertcmd();
- void handleprintcmd();
- void handlequitcmd();
- void handleerrorwrite(long);
- void handlehelpcmd();
- long getfilename(char *, char *, char *, char *, char *, long (*)(char *));
- void doopen(char *);
- void initsignal();
- void getwindowinfo();
- void makewintitle();
- void setdirtyfile();
- void cleardirtyfile();
-
- long message(char *, char *, char *, char *);
- void writecheckpointfile();
- void writebackupfile();
- void savemat();
- void restoremat();
-
- void makepulldown();
- void drawpulldown();
- long pulldownevent(long, long);
- void remakepulldown();
-
- #define NEWCMD 100001
- #define OPENCMD 100002
- #define SAVECMD 100003
- #define SAVEASCMD 100004
- #define INSERTCMD 100005
- #define PRINTCMD 100006
- #define QUITCMD 100007
- #define HELPCMD 100008
-
- #define TOUCHME 100009
- #define PRINTEPS 100010
-
- long openstatus(char *);
-
- /* returns from openstatus() */
-
- #define FILE_EXISTS 1
- #define CAN_WRITE_FILE 2
-
- struct application_entries {
- long (*readfile)(char *);
- long (*writefile)(char *);
- long (*errorwritefile)(char *);
- long (*insertfile)(char *);
- long (*printfile)(char *);
- void (*makecheckpointname)(char *);
- void (*makebackupname)(char *);
- void (*clearbuffer)();
- void (*help)();
- void (*quit)();
- void (*exit)();
- };
-
- extern struct application_entries entries;
-
- #endif /* _GENERIC_APP */
-